package com.lanvideo.entity;

import java.time.LocalDateTime;

/**
 * 学习笔记实体类
 */
public class LearningNote {
    private Integer id;
    private Integer userId;
    private Integer videoId;
    private String title;
    private String content;
    private Integer position; // 笔记对应的视频位置（秒）
    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;
    
    // 关联信息
    private String videoTitle;
    private String userName;

    public LearningNote() {}

    public LearningNote(Integer userId, Integer videoId, String title, String content) {
        this.userId = userId;
        this.videoId = videoId;
        this.title = title;
        this.content = content;
        this.position = 0;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getVideoId() {
        return videoId;
    }

    public void setVideoId(Integer videoId) {
        this.videoId = videoId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }

    public String getVideoTitle() {
        return videoTitle;
    }

    public void setVideoTitle(String videoTitle) {
        this.videoTitle = videoTitle;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return "LearningNote{" +
                "id=" + id +
                ", userId=" + userId +
                ", videoId=" + videoId +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", position=" + position +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                ", videoTitle='" + videoTitle + '\'' +
                ", userName='" + userName + '\'' +
                '}';
    }
}
